package com.market.plus.taglibs.standard.functions;

import java.text.ParseException;
import java.util.Date;
import java.util.List;

import com.market.plus.core.exception.MarketRuntimeException;
import com.market.plus.core.util.DateUtil;

public class Functions {

   @SuppressWarnings("rawtypes")
   public static boolean contains(List list, Object o) {
      if (list == null)
         return false;
      return list.contains(o);
   }


   public static String formatShortDate(Date value, int timezoneOffsetMinutes){
      try {
         return DateUtil.formatShortDate(value, timezoneOffsetMinutes);
      }
      catch (ParseException e) {
         throw new MarketRuntimeException(e);
      }
   }
}
